<?php

/**
 * Author: ryu
 *
 * @email:    mo5467@126.com
 * @date:     2020-04-24 00:01:22
 * @lastTime: 2020-04-25 23:30:11
 */

namespace Design\Structural\Adapter;

class EbookAdapter implements Book
{

    private $ebook;


    public function __construct(Ebook $ebook)
    {
        $this->ebook = $ebook;

    }//end __construct()


    public function open()
    {
        $this->ebook->unlock();

    }//end open()


    public function turnPage()
    {
        $this->ebook->pressNext();

    }//end turnPage()


    public function getPage(): int
    {
        return $this->ebook->getPage()[0];

    }//end getPage()


}//end class
